﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using OneMG.Phoenix.Service.Contracts;
using OneMG.Phoenix.Service;
using OneMG.Phoenix.Service.Model;

namespace OneMG.Phoenix.AdminSite.Controllers
{
    public class CategoryController : Controller
    {
		ICategoryService ICategory = new CategoryService();


        public ActionResult Index()
        {

			int pid = 0;
			int.TryParse(Request.QueryString["pid"], out pid);

			IList<CategoryModel> listModle = ICategory.GetByParentID(pid);
			ViewData["listModle"] = listModle;
			ViewData["parentID"] = pid;
            return View();
        }

    }
}
